//
//  CLNetWorkPrivate.h
//  Charles
//
//  Created by Leo on 2018/6/19.
//  Copyright © 2018年 charles. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CLBaseRequest.h"

@interface CLNetWorkUtils : NSObject

+ (NSStringEncoding)stringEncodingWithRequest:(CLBaseRequest *)request;
+ (NSString *)md5StringFromString:(NSString *)string;
+ (NSString *)appVersionString;
+ (BOOL)validateResumeData:(NSData *)data;
+ (BOOL)validateJSON:(id)json withValidator:(id)jsonValidator;

@end

@interface CLBaseRequest (Setter)

@property (nonatomic, strong, readwrite) NSURLSessionTask *requestTask;
@property (nonatomic, strong, readwrite) NSData *responseData;
@property (nonatomic, strong, readwrite) id responseJSONObject;
@property (nonatomic, strong, readwrite) id responseObject;
@property (nonatomic, strong, readwrite) NSString *responseString;
@property (nonatomic, strong, readwrite) NSError *error;

@end
